﻿namespace NTLib.WPF.Interactions
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows;

    /// <summary>
    /// 
    /// </summary>
    /// <seealso cref="System.Windows.DependencyObject" />
    /// <seealso cref="NTLib.WPF.Interactions.IInteraction" />
    public abstract class BaseActioner<TDependencyObject> : BaseInteraction<TDependencyObject> // Freezable, IInteraction
        where TDependencyObject : DependencyObject
    {
        #region Fields

        //private DependencyObject _attachedObject;
        //private object _dataContext;

        #endregion

        #region Properties

        ///// <summary>
        ///// Gets the attached object.
        ///// </summary>
        //protected DependencyObject AttachedObject
        //{
        //    get { return this._attachedObject; }
        //}

        /// <summary>
        /// Gets the data context.
        /// </summary>
        /// <remarks>
        /// Every binding that will followed must Specify this property has source because only FrameworkElement inherite each other from the data context.
        /// </remarks>
        //public object DataContext
        //{
        //    get
        //    {
        //        if (this._dataContext == null)

        //            return this._dataContext;
        //    }
        //    set { this._dataContext = value; }
        //}

        #endregion

        #region Methods

        /// <summary>
        /// Invokes the specified parameters.
        /// </summary>
        /// <param name="parameters">The parameters.</param>
        public abstract void Invoke(object parameters);

        ///// <summary>
        ///// Attacheds the specified object.
        ///// </summary>
        ///// <param name="obj">The object.</param>
        //public void Attached(DependencyObject obj)
        //{
        //    this._attachedObject = obj;
        //}

        ///// <summary>
        ///// Dettacheds the specified object.
        ///// </summary>
        //public void Detached()
        //{
        //    this._attachedObject = null;
        //}

        #endregion
    }

    /// <summary>
    /// 
    /// </summary>
    /// <seealso cref="NTLib.WPF.Interactions.BaseInteraction{TDependencyObject}" />
    public abstract class BaseActioner : BaseActioner<DependencyObject>
    {

    }
}
